<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: SunKai
  Date: 14-12-9
  Time: 下午5:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link type="text/css" rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/bootstrap/css/bootstrap-table.css">
    <script type="text/javascript" src="/static/jquery-2.1.0.min.js"></script>
    <script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/static/bootstrap/js/bootstrap-table.js"></script>
    <title>度假屋列表</title>
    <script type="text/javascript">
        function rowStyle(row, index) {
            var classes = ['active', 'success', 'info', 'warning', 'danger'];

            if (index % 2 === 0 && index / 2 < classes.length) {
                return {
                    classes: classes[index / 2]
                };
            }
            return {};
        }
    </script>
</head>
<body>
<div>
    <table class="table table-striped" data-row-style="rowStyle">
        <thead>
        <tr style="height: 45px;">
        <th>度假屋名称</th>
        <th>周次</th>
        <th>价格</th>
        <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${list}"  var="list">
            <tr>
                <td>${list.name}</td>
                <td></td>
                <td>${list.price}</td>
                <td><span class="label label-info" onclick="updateData('${list.guid}')">修改</span></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>
</body>
</html>